const axios = require('axios');
const cheerio = require('cheerio');

module.exports = (url) => {
    return new Promise((resolve, reject) => {
        axios({ url }).then(res => {
            resolve({
                $: cheerio.load(res.data),
                html: res.data
            });
        }).catch(reject);
    });
};
